package com.xiaoming.e3mall.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 页面跳转Controller
 */
@Controller
public class PageController {


    @RequestMapping("/")
    public String showIndex(){
        return "index.jsp";
    }

    /**
     *根据参数url传过来的路径进行跳转页面
     */
    @RequestMapping("/{page}")
    public String toPage(@PathVariable String page,String url){
        return page+".jsp";
    }

}
